package com.hjm.project.salaryPlan.agentActivityOpen.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import com.hjm.project.salaryPlan.agentActivityOpen.mapper.AgentActivityOpenMapper;
import com.hjm.project.salaryPlan.agentActivityOpen.domain.AgentActivityOpen;
import com.hjm.project.salaryPlan.agentActivityOpen.service.IAgentActivityOpenService;
import com.hjm.common.utils.text.Convert;

import javax.annotation.Resource;

/**
 * 开通底薪计划代理Service业务层处理
 * 
 * @author maker-platform
 * @date 2022-04-07
 */
@Service
public class AgentActivityOpenServiceImpl implements IAgentActivityOpenService {
    @Resource
    private AgentActivityOpenMapper agentActivityOpenMapper;

    /**
     * 查询开通底薪计划代理
     * 
     * @param id 开通底薪计划代理ID
     * @return 开通底薪计划代理
     */
    @Override
    public AgentActivityOpen selectAgentActivityOpenById(Integer id) {
        return agentActivityOpenMapper.selectAgentActivityOpenById(id);
    }

    /**
     * 查询开通底薪计划代理列表
     * 
     * @param agentActivityOpen 开通底薪计划代理
     * @return 开通底薪计划代理
     */
    @Override
    public List<AgentActivityOpen> selectAgentActivityOpenList(AgentActivityOpen agentActivityOpen) {
        return agentActivityOpenMapper.selectAgentActivityOpenList(agentActivityOpen);
    }

    /**
     * 查询开通底薪计划代理列表
     *
     * @param agentActivityOpen 开通底薪计划代理
     * @return 开通底薪计划代理 一个结果
     */
    @Override
    public AgentActivityOpen selectAgentActivityOpenOne(AgentActivityOpen agentActivityOpen) {
        return agentActivityOpenMapper.selectAgentActivityOpenOne(agentActivityOpen);
    }

    /**
     * 新增开通底薪计划代理
     * 
     * @param agentActivityOpen 开通底薪计划代理
     * @return 结果
     */
    @Override
    public int insertAgentActivityOpen(AgentActivityOpen agentActivityOpen) {
        return agentActivityOpenMapper.insertAgentActivityOpen(agentActivityOpen);
    }

    /**
     * 修改开通底薪计划代理
     * 
     * @param agentActivityOpen 开通底薪计划代理
     * @return 结果
     */
    @Override
    public int updateAgentActivityOpen(AgentActivityOpen agentActivityOpen) {
        return agentActivityOpenMapper.updateAgentActivityOpen(agentActivityOpen);
    }

    /**
     * 删除开通底薪计划代理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAgentActivityOpenByIds(String ids) {
        return agentActivityOpenMapper.deleteAgentActivityOpenByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除开通底薪计划代理信息
     * 
     * @param id 开通底薪计划代理ID
     * @return 结果
     */
    @Override
    public int deleteAgentActivityOpenById(Integer id) {
        return agentActivityOpenMapper.deleteAgentActivityOpenById(id);
    }
}
